package com.lins.storedisk.common;

import lombok.Getter;

/**
 * APP业务状态码
 * @Author linshuo
 * @Date 2023/8/15 14:11
 */

@Getter
//public enum AppCode implements IStatusCode {
public enum AppCode {

    /*系统级别*/
    OK(200,"请求成功"),
    QUERY_OK(200,"查询成功"),
    ADD_OK(200,"新增成功"),
    UODATE_OK(200,"修改成功"),
    DEL_OK(200,"删除成功"),

    TOKEN_ERROR(403, "token错误"),

    APP_ERROR(500, "业务异常"),
    SESSION_ERROR(501, "会话异常"),
    PARAM_ERROR(502, "参数异常"),
    BEAN_ERROR(503, "BEAN实例异常"),
    IP_ERROR(504, "IP地址错误"),
    CALLBACK_ERROR(505, "回调异常"),

    REG_OK(200,"注册成功"),
    LOGIN_OK(200,"登录成功"),
    LOGOUT_OK(200,"注销成功"),

    USERSTATE_ERROR(510, "用户状态异常"),
    LEVEL_ERROR(511, "用户权限异常"),
    USERNAME_ERROR(512, "用户名错误"),
    PWD_ERROR(513, "密码错误"),
    USERNAMEORPWD_ERROR(514, "用户名或密码错误"),
    REGISTERUSER_ERROR(515, "注册用户异常"),
    AUTHENTICATE_ERROR(516, "用户验证身份未通过"),
    VERIFICATION_ERROR(517, "图形验证码错误"),
    MSMCODE_ERROR(518, "短信验证码错误"),
    USERINFO_ERROR(519, "用户信息异常"),
    USERSET_ERROR(520, "用户设置异常"),
    USERPOLICY_ERROR(521, "用户策略异常"),

    /*文件*/
    FILESTATE_ERROR(550, "文件状态异常"),
    FILETYPE_ERROR(551, "文件类型异常"),
    FILEIO_ERROR(552, "文件IO异常"),
    OSS_ERROR(553, "OSS异常"),
    SaveFAIL(554, "保存失败"),
    ERROR(500, "其他异常");

    private int code;
    private String msg;

    AppCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
